﻿using System;
using System.Collections.Generic;
using DesignPattern.Builder.Computer;

namespace DesignPattern.Builder
{
    /// <summary>
    /// 指挥者
    /// </summary>
    public class Director 
    {
        AbsBuilderComputer computer;

        public void SetComputer(AbsBuilderComputer computer)
        {
            this.computer = computer;
        }

        public AbsBuilderComputer Contractor()
        {
            this.computer.SetHost();
            this.computer.SetKeyboarder();
            this.computer.SetMouse();
            return this.computer;
        }
    }

}
